import time
# from tqdm.gui import tqdm
from numpy.core.setup_common import file
from tqdm import tqdm

def tqdm_gui():
    pbar = tqdm(range(337))
    for i in pbar:
        time.sleep(0.01)  # your code here
        pbar.set_description("iter %d" % i)
        pbar.update(1)

def tqdm_leave():
    with tqdm(iterable=100,leave=False, total=100) as bar:
        for i in range(100):
            time.sleep(0.01)
            bar.update()

if __name__ == '__main__':
    # tqdm_gui()
    tqdm_leave()
